package com.ruoyi.vo;

import com.ruoyi.common.annotation.Excel;
import com.volcengine.model.livesaas.response.ListQuizRecordAPIResponse.QuizRecordAPI;

import cn.hutool.json.JSONUtil;

public class QuizStatisticsVo {
	
	public QuizStatisticsVo() {
		super();
	}
 
	
	public QuizStatisticsVo(Long zbjlid, Long quizid, QuizRecordAPI quizRecordAPI) {
		super();
		this.zbjlid = zbjlid;
		this.quizid = quizid;
		this.memberid = quizRecordAPI.getUserID();
		this.nickname = quizRecordAPI.getUserName();
		this.dtTime = quizRecordAPI.getCreateTime();
		this.sfright = 0;
		if(quizRecordAPI.getIsRight()) {
			this.sfright = 1;
		}
		if(quizRecordAPI.getSubmitOptions()!=null && quizRecordAPI.getSubmitOptions().size()>0) {
			try {
				this.submitoptions = JSONUtil.toJsonStr(quizRecordAPI.getSubmitOptions());
			} catch (Exception e) {
			}
		}
		this.id = zbjlid+"_"+quizid+"_"+memberid;
		
	}

	@Excel(name = "id")
	private String id;

	@Excel(name = "直播间记录id")
	private Long zbjlid;
	  
	@Excel(name = "答题id")
	private Long quizid;
	  
    @Excel(name = "用户id")
    private Long memberid;
    
    @Excel(name = "昵称")
    private String nickname;
    
    @Excel(name = "答题时间")
    private Long dtTime;
    
    @Excel(name = "是否正确")
    private Integer sfright;
    
    @Excel(name = "提交的答案")
    private String submitoptions;
    

    
    
}
